home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmPrinc
- BorderStyle = 1 'Fixed Single
- Caption = "Ejecutando aplicaciones"
- ClientHeight = 3570
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4485
- Icon = "frmPrinc.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3570
- ScaleWidth = 4485
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton cmdEjecutar
- Caption = "Ejecutar"
- Height = 495
- Index = 4
- Left = 360
- TabIndex = 5
- Top = 2760
- Width = 1215
- End
- Begin VB.TextBox txtArchivo
- Height = 285
- Left = 360
- TabIndex = 0
- Top = 2280
- Width = 3735
- End
- Begin VB.CommandButton cmdEjecutar
- Caption = "Abrir el explorador"
- Height = 615
- Index = 3
- Left = 2280
- TabIndex = 4
- Top = 1080
- Width = 1815
- End
- Begin VB.CommandButton cmdEjecutar
- Caption = "Ver archivo de texto"
- Height = 615
- Index = 2
- Left = 360
- TabIndex = 3
- Top = 1080
- Width = 1815
- End
- Begin VB.CommandButton cmdEjecutar
- Caption = "El reproductor de CDs"
- Height = 615
- Index = 1
- Left = 2280
- TabIndex = 2
- Top = 360
- Width = 1815
- End
- Begin VB.CommandButton cmdEjecutar
- Caption = "Calculadora"
- Height = 615
- Index = 0
- Left = 360
- TabIndex = 1
- Top = 360
- Width = 1815
- End
- Begin VB.Label lblTitulo
- AutoSize = -1 'True
- Caption = "Archivo a ejecutar (y par
- metros):"
- Height = 195
- Left = 360
- TabIndex = 6
- Top = 1920
- Width = 2370
- End
- Attribute VB_Name = "frmPrinc"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdEjecutar_Click(Index As Integer)
- Dim ret As Long
- 'Cuando haya un error, ir hasta "Errores"
- On Error GoTo Errores
- 'Seg
- n el bot
- n que haya pulsado...
- Select Case Index
- Case 0
- ret = Shell("calc", vbNormalFocus)
- Case 1
- ret = Shell("cdplayer", vbNormalFocus)
- Case 2
- ret = Shell("notepad c:\windows\readme.txt", vbMaximizedFocus)
- Case 3
- ret = Shell("explorer c:\windows", vbMaximizedFocus)
- Case 4
- ret = Shell(txtArchivo, vbNormalFocus)
- End Select
- 'Deshabilitamos el manejo de errores...
- On Error GoTo 0
- Exit Sub
- Errores:
- 'Si el error fue que no exist
- a el archivo...
- If Err = 53 Then
- MsgBox "No se encontr
- el archivo!"
- End If
- 'Seguir con la sentencia siguiente
- Resume Next
- End Sub
-